How to find the month and year of date in PostgreSQL